package cz.data.common.support.db.driver;

import com.alibaba.fastjson.JSONObject;
import cz.data.common.support.db.core.DbTable;
import cz.data.common.support.db.manage.Condition;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

@Getter
@Setter
public class DataOperation implements Serializable {
    private static final long serialVersionUID=1L;

    @NotBlank(message = "数据源不能为空")
    private String source;
    @NotNull(message = "操作表不能为空")
    private DbTable table;
    private JSONObject data;

    private List<String> fields;
    private List<Condition> conditions;
    private Integer pageNum = 1;
    private Integer pageSize = 20;
}
